<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="admin/inc/conn.inc"-->
<!--#include file="trimVBcrlf.inc"-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登录</title>
<link href="CSS/77go.css" rel="stylesheet" type="text/css" />
</head>
<body>
<%
function getNickName()
	strUsername = SelfRequestString("username")
	strPassword = SelfRequestString("passwd")
	if session("Nickname") = "" and (strUsername = "" or strPassword = "") then
		response.Redirect("login1.asp")
		getNickName = ""
	else
		if session("Nickname") = "" then	
			Randomize
			Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
			xmlHttp.open "GET", "http://www.77go.cn/authimg?a=" & Rnd, false
			xmlHttp.send
			
			Cookie = xmlHttp.getResponseHeader("Set-Cookie")
			Cookie = Replace(Cookie, "; path=/", "")
			AuthCode = Replace(Cookie, "AI=", "")
			
			xmlHttp.open "POST", "http://www.77go.cn/login.bbscs", false
			xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
			xmlHttp.send "username=" & strUsername & "&tourl=indexpage&action=login&passwd=" & strPassword & "&authcode=" & AuthCode
			RespnoseBody = xmlHttp.responseText
			RespnoseBody = Mid(RespnoseBody, 1, 170)
			If Instr(RespnoseBody, "alert") > 0 Then
				Response.Write "<script language=""javascript"">window.location.href='login1.asp';</script>"
				getNickName = ""
			Else
				xmlHttp.open "GET", "http://www.77go.cn/in.bbscs", false
				xmlHttp.send "authcode=" & AuthCode
				RespnoseBody = xmlHttp.responseText
				Dim regEx, match, matches ' 建立变量。 
				Set regEx = New RegExp ' 建立规范表达式。
				regEx.Pattern = "Welcome.+"
				'regEx.IgnoreCase = False ' 设置是否区分字母的大小写。 
				'regEx.Global = True ' 设置全程性质。 
				set matches= regEx.Execute(RespnoseBody) ' 执行搜索。
				if Not IsEmpty(matches) then
					strNickName = matches(0).value
					strNickName = replace(strNickName, "Welcome", "")
					strNickName = replace(strNickName, Chr(13), "")
					strNickName = replace(strNickName, Chr(10), "")
					strNickName = trim(strNickName)
					getNickName = strNickName
				else
					getNickName = ""
				end if
			End If
		else
			getNickName = session("Nickname")
		end if
	end if
End Function
if session("Nickname") = "" then
	strNickName = getNickName()
	if strNickName <> "" And strNickName <> "guest" then
		strUsername = SelfRequestString("username")
		strPassword = SelfRequestString("passwd")
		session("Username") = strUsername
		session("Password") = strPassword
		session("Nickname") = strNickName
		strSQL = "select * from User where Username='" & strUsername & "'"
		Set rs = Server.CreateObject("ADODB.Recordset")
		rs.Open strSQL, dbconnection, adOpenDynamic, 3
		if rs.eof then
			rs.AddNew
		end if
		rs("Username") = strUsername
		rs("Password") = strPassword
		rs("Nickname") = strNickName
		rs.Update
	else
		Response.Write "<script language=""javascript"">window.location.href='login1.asp';</script>"
	end if
else
	strUsername = session("Username")
	strPassword = session("Password")
	strNickName = session("Nickname")
end if
%>
<div id="login-border">
  <div id="login-info">
    <div id="login-input"><span class="oo_2">欢迎您</span><span class="foooo"><%=strNickName%></span></div><br />
    <div id="login-input"><img src="images/icon-mm2.gif" width="16" height="14" align="absmiddle" /><a href="http://www.77go.cn/sign.bbscs" target="_blank" class="f7">设置签名</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/icon-mm.gif" width="14" height="11" align="absmiddle" /><a href="http://www.77go.cn/note.bbscs" target="_blank" class="f7">留言信息</a></div><br />
    <div id="login-input"><img src="images/icon-mm3.gif" width="17" height="14" align="absmiddle" /><a href="http://www.77go.cn/myDetail.bbscs" target="_blank" class="f7">个人资料</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/icon-mm4.gif" width="14" height="14" align="absmiddle" /><a href="http://www.77go.cn/cpasswd.bbscs" target="_blank" class="f7">修改密码</a></div><br />
    <div id="login-input"><a href="http://www.77go.cn/main.bbscs" target="_blank"><img src="images/inbbs.gif" width="86" height="20" border="0" /></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/logout.asp"> <img src="images/logout.gif" width="77" height="22" border="0" name="imageField" /></a></div>
  </div>
</div><br />
友情链接：<br>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
strSQL = "select * from frank order by id asc"
rs.Open strSQL, dbconnection, adOpenDynamic, 3
Dim TextArray55(4)
Dim TextArray88(4)
Dim TextArray99(4)


for i = 0 to ubound(TextArray88) 
	if not rs.eof then
		TextArray55(i)=rs("Text")
		TextArray88(i)=rs("Pic")
		TextArray99(i)=rs("Url")
		rs.movenext
	else
		TextArray55(i)="&nbsp;"
		TextArray88(i)="&nbsp;"
		TextArray99(i)="&nbsp;"
	end if
next
set rs = nothing
%>
<div id=gundongpic style="BACKGROUND: #ffffff; OVERFLOW: hidden; WIDTH: 150px; COLOR: #ffffff; HEIGHT: 50px">
        <table height=50 cellSpacing=0 cellPadding=0 width=70 align=center border=0 cellspace="0">
          <tr>
            <td id=gundongpic1 vAlign=top>
              <table cellSpacing=1 cellPadding=0 width="100%" border=0>
                <tr>
                  <td vAlign=center align=middle>
                    <table cellSpacing=0 cellPadding=2 width=55 align=center border=0>
                      <tr>
                        <td class=formkuang2><A title="<%=TextArray55(0)%>" href="<%=TextArray99(0)%>" target=_blank><IMG height=50 src="<%=TextArray88(0)%>" width=50 align=absMiddle border=0> <A></A></td>
                      </tr>
                      <tr>
                        <td>

                        </td>
                      </tr>
                    </table>
                  </td>
                  <td vAlign=center align=middle width=15>&nbsp;</td>
                  <td vAlign=center align=middle>
                    <table cellSpacing=0 cellPadding=2 width=50 align=center border=0>
                      <tr>
                        <td class=formkuang2><A title="<%=TextArray55(1)%>" href="<%=TextArray99(1)%>" target=_blank><IMG height=50 src="<%=TextArray88(1)%>" width=50 align=absMiddle border=0> <A></A></td>
                      </tr>
                      <tr>
                        <td>

                        </td>
                      </tr>
                    </table>
                  </td>
                  <td vAlign=center align=middle width=15>&nbsp;</td>
                  <td vAlign=center align=middle>
                    <table cellSpacing=0 cellPadding=2 width=50 align=center border=0>
                      <tr>
                        <td class=formkuang2><A title="<%=TextArray55(2)%>" href="<%=TextArray99(2)%>" target=_blank><IMG height=50 src="<%=TextArray88(2)%>" width=50 align=absMiddle border=0> <A></A></td>
                      </tr>
                      <tr>
                        <td>

                        </td>
                      </tr>
                    </table>
                  </td>
                  <td vAlign=center align=middle width=15>&nbsp;</td>
                  <td vAlign=center align=middle>
                    
                  </td>
                  <td vAlign=center align=middle width=15>&nbsp;</td>
                  <td vAlign=center align=middle>
                   
                  </td>
                  <td vAlign=center align=middle width=15>&nbsp;</td>
                </tr>
              </table>
            </td>
            <td id=gundongpic2 vAlign=top width=1></td>
          </tr>
        </table>
<SCRIPT>
             var speed=30
             gundongpic2.innerHTML=gundongpic1.innerHTML
             function Marquee(){
             if(gundongpic2.offsetWidth-gundongpic.scrollLeft<=0)
             gundongpic.scrollLeft-=gundongpic1.offsetWidth
             else{
             gundongpic.scrollLeft++
             }
             }
             var MyMar=setInterval(Marquee,speed)
             gundongpic.onmouseover=function() {clearInterval(MyMar)}
             gundongpic.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
                      </SCRIPT> 
</div>
</body>
</html>
<!--#include file="disconn.inc"-->
